<? if(!defined('IN_TIPASK')) exit('Access Denied'); global $starttime,$querynum;$mtime = explode(' ', microtime());$runtime=number_format($mtime['1'] + $mtime['0'] - $starttime,6); $setting=$this->setting;$user=$this->user;$headernavlist=$this->nav;$regular=$this->regular; ?><!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=<?=TIPASK_CHARSET?>"/>
<title><?=$title?></title>
<meta name="keywords" content="<?=$metakeywords?><?=$setting['seo_keywords']?>" />
<meta name="description" content="<?=$metadescription?> <?=$setting['site_name']?> <?=$setting['seo_description']?>" />
<meta name="generator" content="Tipask <?=TIPASK_VERSION?> <?=TIPASK_RELEASE?>" />
<meta name="author" content="Tipask Team" />
<meta name="copyright" content="2011 Tipask.com." />
<meta name="robots" content="index, follow">
<meta name="googlebot" content="index, follow">
<link href="<?=SITE_URL?>css/default/ask.css" rel="stylesheet" type="text/css">
<link href="<?php echo SITE_URL;?>../css/layout.css" rel="stylesheet" type="text/css" />
<script type="text/javascript">
g_site_url='<?=SITE_URL?>';g_prefix='<?=$setting['seo_prefix']?>';g_suffix='<?=$setting['seo_suffix']?>';editor_items='<?=$setting['editor_items']?>';
</script>
<script src="<?=SITE_URL?>js/jquery.js" type="text/javascript"></script>
<script src="<?=SITE_URL?>js/dialog.js" type="text/javascript"></script>
<script src="<?=SITE_URL?>js/common.js" type="text/javascript"></script>

<script type = "text/javascript">
$(document).ready(function(){
	$( ".menu-link" ).mouseover( function(  ){
	    $( this ).css( "background","#2c2c2c" );
	});
	$( ".menu-link" ).mouseleave( function(  ){
	    $( this ).css({"background":"url('<?php echo SITE_URL."..";?>/image/menu.png') repeat-x left"} );
	
	});
	$( ".menu-search" ).mouseover( function(  ){
	    $( this ).css( "background","#2c2c2c" );
	});
	$( ".menu-search" ).mouseleave( function(  ){
	    $( this ).css({"background":"url('<?php echo SITE_URL."..";?>/image/menu.png') repeat-x left"} );
	});

	controller = get_controller();
	$("#google_search_"+controller).attr("selected","selected");
	
});
function google_search_submit(){
	cat = $("#google_search_select").val();
	if(cat == "tipask")
		$("#google_search_form").attr("action","<? echo SITE_URL."..";?>/tipask/?question/search/3.html");
	//$("#google_search_form").attr("action","http://localhost/test/post.php");
	$("#google_search_form").submit();
}
</script>

<?php 
	$header_uid=$user['uid'];
		if($header_uid != 0)
		{
			$header_username = $user['username'];
		}
		else 
			$header_username = "";
?>
<?=$setting['seo_headers']?>
</head>
<div id="header">
    <div id="logo"><img src="<?php echo SITE_URL;?>../image/logo.png"></div>
    <div id="header_user">
    		<div id="user_identifier" uid="<?php echo $header_uid?>" username="<?php echo $header_username?>" hidden="true"></div>
			<span style="color:#ea5975;"><?php echo $header_username;?></span>
			<?php if($header_uid > 0):?>
				<span class="topnav"><a target="_top" href="<?php echo SITE_URL;?>../tipask/?user/default.html">个人中心</a></span>
				<span class="topnav"><a target="_top" href="<?php echo SITE_URL;?>../tipask/?question/add.html">我要提问</a></span>
	            <span class="topnav"><a target="_top" href="<?php echo SITE_URL;?>../tipask/?user/logout.html">退出</a></span>&nbsp;&nbsp;
            <?php else:?>
	            <span class="topnav"><a target="_top" href="<?php echo SITE_URL;?>../tipask/?user/register.html">注册</a></span>
	            <span class="topnav"><a target="_top" href="<?php echo SITE_URL;?>../tipask/?user/login.html">登录</a></span>
			<?php endif;?>            			
    </div>		
    <div id="header_menu">
      <div class="menu-link">
	<a target="_top" class = "headermenu" href="<?php echo SITE_URL;?>../index.php">首页</a>
      </div>

      <div class="menu-link" id="menu-link">
	<a target="_top" class = "headermenu" href="<?php echo SITE_URL;?>../index.php/share">分享</a>
      </div>
      <div class="menu-link" id="menu-link">
	<a target="_top" class = "headermenu" href="<?php echo SITE_URL;?>../index.php/recall/recall_main">回忆</a>
      </div>
      <div class="menu-link" id="menu-link">
	<a target="_top"  class = "headermenu" href="<?php echo SITE_URL;?>../tipask/">问答</a>
      </div>
      <div class="menu-link" id="menu-link">
			<a target="_top" class = "headermenu" href="<?php echo SITE_URL;?>../tipask/?index/help.html">帮助</a>
      </div>
      <div class="menu-search" id="menu-link">
			<form id="google_search_form" action="<?php echo SITE_URL."../index.php/";?>search/index" method="POST">
			<div>
			    <input type="text" name="word" id="google_search_input" size="31" />
			    <input type="button" name="sa" id="google_search_button" value="搜索" onclick="google_search_submit();"/>
			    
			    <select name="category" id="google_search_select">
					<option id="google_search_site" value="site">全站</option>
					<option id="google_search_share" value="share">资料分享</option>
					<option id="google_search_recall" value="recall">试卷回忆</option>
					<option id="google_search_tipask" value="tipask" selected>问答</option>
					
			  	</select>
			    
			</div>
			</form>
      </div>
	            	
    </div>
</div>

<div class="body_container">